home *** CD-ROM | disk | FTP | other *** search
/ Comix Games / Comix Games.iso / jetsons / jetsons.exe / jetsons.dxr / 00042.ls < prev    next >
Encoding:
Text File  |  1996-11-19  |  3.7 KB  |  89 lines

  1. on MoveOtherShips
  2.   global theFirstBuildingChannel, theLastBuildingChannel, theBackgroundVelocity, theFirstOtherShipChannel, theLastOtherShipChannel, theOtherShipVelocity
  3.   if theBackgroundVelocity <= 0 then
  4.     repeat with h = theFirstOtherShipChannel to theLastOtherShipChannel
  5.       if the right of sprite h < 0 then
  6.         set y1 to random(the stageBottom - the stageTop - the height of sprite theFirstBuildingChannel - the height of sprite h)
  7.         set iWhich to random(7)
  8.         if iWhich = 1 then
  9.           set the memberNum of sprite h to the number of member "Other 1 Left"
  10.         else
  11.           if iWhich = 2 then
  12.             set the memberNum of sprite h to the number of member "Other 2 Left"
  13.           else
  14.             if iWhich = 3 then
  15.               set the memberNum of sprite h to the number of member "Other 3 Left"
  16.             else
  17.               if iWhich = 4 then
  18.                 set the memberNum of sprite h to the number of member "Other 4 Left"
  19.               else
  20.                 if iWhich = 5 then
  21.                   set the memberNum of sprite h to the number of member "Other 5 Left"
  22.                 else
  23.                   if iWhich = 6 then
  24.                     set the memberNum of sprite h to the number of member "Other 6 Left"
  25.                   else
  26.                     set the memberNum of sprite h to the number of member "Other 7 Left"
  27.                   end if
  28.                 end if
  29.               end if
  30.             end if
  31.           end if
  32.         end if
  33.         set x1 to the stageRight - the stageLeft
  34.         set x2 to x1 + the width of sprite h
  35.         set y2 to y1 + the height of sprite h
  36.         set the stretch of sprite h to 1
  37.         spriteBox(h, x1, y1, x2, y2)
  38.         set the stretch of sprite h to 0
  39.         next repeat
  40.       end if
  41.       set the locH of sprite h to the locH of sprite h + (theBackgroundVelocity / 2) - theOtherShipVelocity
  42.     end repeat
  43.   else
  44.     repeat with h = theFirstOtherShipChannel to theLastOtherShipChannel
  45.       if the left of sprite h > (the stageRight - the stageLeft) then
  46.         set y1 to random(the stageBottom - the stageTop - the height of sprite theFirstBuildingChannel - the height of sprite h)
  47.         set iWhich to random(7)
  48.         if iWhich = 1 then
  49.           set the memberNum of sprite h to the number of member "Other 1 Left"
  50.         else
  51.           if iWhich = 2 then
  52.             set the memberNum of sprite h to the number of member "Other 2 Left"
  53.           else
  54.             if iWhich = 3 then
  55.               set the memberNum of sprite h to the number of member "Other 3 Left"
  56.             else
  57.               if iWhich = 4 then
  58.                 set the memberNum of sprite h to the number of member "Other 4 Left"
  59.               else
  60.                 if iWhich = 5 then
  61.                   set the memberNum of sprite h to the number of member "Other 5 Left"
  62.                 else
  63.                   if iWhich = 6 then
  64.                     set the memberNum of sprite h to the number of member "Other 6 Left"
  65.                   else
  66.                     set the memberNum of sprite h to the number of member "Other 7 Left"
  67.                   end if
  68.                 end if
  69.               end if
  70.             end if
  71.           end if
  72.         end if
  73.         set x1 to the stageRight - the stageLeft
  74.         set x2 to x1 + the width of sprite h
  75.         set y2 to y1 + the height of sprite h
  76.         spriteBox(h, x1, y1, x2, y2)
  77.         set x1 to 0 - the width of sprite h
  78.         set x2 to x1 + the width of sprite h
  79.         set y2 to y1 + the height of sprite h
  80.         set the stretch of sprite h to 1
  81.         spriteBox(h, x1, y1, x2, y2)
  82.         set the stretch of sprite h to 0
  83.         next repeat
  84.       end if
  85.       set the locH of sprite h to the locH of sprite h + (theBackgroundVelocity / 2) - theOtherShipVelocity
  86.     end repeat
  87.   end if
  88. end
  89.